public class SS {

    public int maxLength(int[] nums) {
        int res = 0, temp = 0;
        for (int i = 0; i < nums.length; i++) {
            for (int l = i - 1; l >= 0; l--) {
                if (nums[l] < nums[l + 1]) {
                    temp++;
                } else {
                    break;
                }
            }

            for (int r = i + 1; r < nums.length; r++) {
                if (nums[r] < nums[r - 1]) {
                    temp++;
                } else {
                    break;
                }
            }

            if (temp + 1 > res) {
                res = temp + 1;

            }
            temp = 0;
        }
        if (res < 3) {
            return 0;
        }

        return res;
    }


    public static void main(String[] args) {
        SS s = new SS();
//        System.out.println(s.maxLength(new int[]{2, 5, 2, 1, 5}));
        System.out.println(s.maxLength(new int[]{2, 2, 2, 1}));
    }
}
